import os
if __name__ == '__main__':

    name = input('请输入您的姓名:')
    age = input('请输入您的年龄:')
    gender = input('请输入您的性别:')
    file_path = '/output.txt'
    if not os.path.exists(file_path):
        f = open(file_path, 'w')
        f.close()
        print("文件已创建")
    else:
        print("文件已存在")

    with open('/output.txt','w',encoding="utf-8") as f:
        f.write(name+age+gender)





